package com.leo.blog.service;


import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import com.leo.blog.dto.LinkExecution;
import com.leo.blog.entity.Link;
import com.leo.blog.enums.LinkStateEnum;

@SpringBootTest
public class LinkServiceImpl {
	@Autowired
	private LinkService linkService;
	
	@Test
	public void testGetAllLinkList() {
		LinkExecution le = linkService.getAllLinkList();
		if(le.getState() == LinkStateEnum.SUCCESS.getState()) {
			for(Link l : le.getLinkList()) {
				System.out.print("id:" + l.getLinkId() + " name:" + l.getLinkName() + " link:" + l.getLinkLink());
				System.out.println();
			}
		}
	}
}
